
<ion-header>

  <ion-navbar>
    <ion-title>{{title}}</ion-title>
  </ion-navbar>

</ion-header>


<ion-content>
  <loading [text]="'加载中...'" *ngIf="showLoading"></loading>
  <ion-list *ngIf="title=='取款记录'">
    <ion-item  *ngFor="let item of dataSource">
      <div class="box flex">
        <p class="time">{{item.CreateTime}}</p>
        <p class="status" [ngClass]="{'success': item.StatusText == '复审通过', 'wait': item.StatusText == '处理中', 'error': item.StatusText == '初审拒绝' || item.StatusText == '复审拒绝'}">{{item.StatusText}}</p>
      </div>
      <div class="money flex">
        <p >
          -{{item.Amount}}
        </p>
      </div>
    </ion-item>
  </ion-list>

  <ion-list *ngIf="title=='存款记录'">
    <ion-item  *ngFor="let item of dataSource">
      <div class="box flex">
        <p class="time">{{item.CreateTime}}</p>
        <p class="status" [ngClass]="{'success': item.StatusText == '完成', 'wait': item.StatusText == '待支付', 'error': item.StatusText == '支付失败'}">{{item.StatusText}}</p>
      </div>
      <div class="money flex">
        <p style="flex: 1">{{item.TypeText}}</p>
        <p><span *ngIf="item.StatusText == '完成'">+</span>{{item.Amount}}</p>
      </div>
    </ion-item>
  </ion-list>
  <ion-list *ngIf="title=='转账记录'">
    <ion-item  *ngFor="let item of dataSource">
      <div class="box flex">
        <p class="time">{{item.CreateTime}}</p>
        <p class="status" [ngClass]="{'success': item.StatusText == '成功'}">{{item.StatusText}}</p>
      </div>
      <div class="money flex">
        <p *ngIf="item.Type == 1"><span>{{item.TypeText}}</span>{{item.GameType}} => 主账户</p>
        <p *ngIf="item.Type == 0"><span>{{item.TypeText}}</span>主账户 => {{item.GameType}}</p>
        <p *ngIf="item.Type == 1">+{{item.Amount}}</p>
        <p *ngIf="item.Type == 0">-{{item.Amount}}</p>
      </div>
    </ion-item>
  </ion-list>

</ion-content>
